package org.geekbang.thinking.in.spring.conversion;

import java.beans.PropertyEditor;

/**
 * @author : zjj
 * @date : 2022/3/7 14:55
 */
public class PropertyEditorDemo {


    public static void main(String[] args) {
        // 模拟 Spring Framework 操作
        String test = "name = 小马哥";
        PropertyEditor propertyEditor = new StringToPropertiesPropertyEditor();
        // 传递文本String
        propertyEditor.setAsText(test);
        // 获取 内容
        System.out.println(propertyEditor.getValue());
        // 自己实现还原内容
        System.out.println(propertyEditor.getAsText());

    }
}
